import time
from selenium import webdriver


options = webdriver.ChromeOptions()
options.add_argument("--window-size=1920,1080")


driver = webdriver.Chrome(options=options)


driver.get("https://translate.google.com/")


cookies = driver.get_cookies()
print("Все куки до удаления:", cookies)


cookie_name = "NID"
driver.delete_cookie(cookie_name)


cookies_after_deletion = driver.get_cookies()
print("Все куки после удаления:", cookies_after_deletion)


cookie_present = any(cookie['name'] == cookie_name for cookie in cookies_after_deletion)
if not cookie_present:
    print(f"Кука '{cookie_name}' успешно удалена.")
else:
    print(f"Кука '{cookie_name}' все еще присутствует.")

